package cn.com.hhrcw.forest;

import cn.com.hhrcw.utils.huawei.CreateMeetingParam;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dtflys.forest.annotation.*;

import java.util.Map;

/**
 * @ProjectName: recruit-boot-parent
 * @Package: cn.com.hhrcw.forest
 * @ClassName: HuaWeiRoomAPI
 * @Author: 朱修轩
 * @Description: 华为会议室api
 * @Date: 2021/5/19 9:23
 * @Version: 1.0
 */
@SuppressWarnings("ALL")
@BaseRequest(baseURL = "${huaWei}")
public interface HuaWeiRoomAPI {

    /**
     * appId 鉴权登录方式
     * @param headerMap
     * @param body
     * @return
     */
    @Post(url = "/v2/usg/acs/auth/appauth")
    JSONObject appAuth(@Header Map<String, Object> headerMap, @Body Map<String, Object> body);

    /**
     * 账号密码登录鉴权
     * @param headerMap
     * @param body
     * @return
     */
    @Post(url = "/v1/usg/acs/auth/account")
    JSONObject authLogin(@Header Map<String, Object> headerMap, @Body Map<String, Object> body);

    /**
     * 创建会议
     * @param headerMap
     * @param body
     * @return
     */
    @Post(url = "/v1/mmc/management/conferences")
    JSONArray conferences(@Header Map<String, Object> headerMap, @Body CreateMeetingParam body);

    /**
     * 取消会议
     * @param headerMap
     * @param body
     * @return
     */
    @Delete(url = "/v1/mmc/management/conferences")
    void cancel(@Header Map<String, Object> headerMap, @Body Map<String, Object> body);

    /**
     * 取消会议
     *
     * @param conferenceID
     * @param headerMap
     * @param body
     */
    @Put(url = "/v1/mmc/management/conferences?conferenceID=0")
    void update(@Query("conferenceID") String conferenceID,@Header Map<String, Object> headerMap, @Body CreateMeetingParam body);

    /**
     * 获取会议室列表
     * @param headerMap
     * @param body
     * @return
     */
    @Get(url = "/v1/usg/dcs/member/vmr")
    JSONObject getList(@Header Map<String, Object> headerMap,@Query Map<String, Object> body);

}
